package com.koron.css2.systemManage.bean;

import java.util.ArrayList;
import java.util.List;

public class OperationTreeBean {

	private Integer id;

	// 用户Code
	private String roleCode;
	// 用户权限标识编码
	private String opCode;
	// 权限状态
	private Integer opStatus;
	// 权限权重
	private Integer opWeight;
	// 权限名称
	private String opName;
	// 权限标识
	private Integer opFlag;
	// 数字编号
	private String seq;
	// 父级掩码
	private Integer parentMask;
	// 掩码
	private Integer mask;
	// 子级掩码
	private Integer childmask;
	// 树的类型
	private Integer type;

	private boolean checked = false;

	private String symbol;

	private String url;

	private String icon;

	private String parentOpCode;

	private List<OperationTreeBean> btnList;

	public OperationTreeBean() {

	}

	public OperationTreeBean(String opCode) {
		super();
		this.opCode = opCode;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getParentOpCode() {
		return parentOpCode;
	}
	public void setParentOpCode(String parentOpCode) {
		this.parentOpCode = parentOpCode;
	}
	public List<OperationTreeBean> getBtnList() {
		return btnList;
	}
	public void setBtnList(List<OperationTreeBean> btnList) {
		this.btnList = btnList;
	}
	public String getIcon() {
		return icon;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getSymbol() {
		return symbol;
	}
	public void setSymbol(String symbol) {
		this.symbol = symbol;
	}
	private List<OperationTreeBean> children = new ArrayList<OperationTreeBean>();

	public List<OperationTreeBean> getChildren() {
		return children;
	}
	public void setChildren(List<OperationTreeBean> children) {
		this.children = children;
	}
	public boolean isChecked() {
		return checked;
	}
	public void setChecked(boolean checked) {
		this.checked = checked;
	}
	public String getRoleCode() {
		return roleCode;
	}
	public String getOpCode() {
		return opCode;
	}
	public Integer getOpStatus() {
		return opStatus;
	}
	public Integer getOpWeight() {
		return opWeight;
	}
	public String getOpName() {
		return opName;
	}
	public Integer getOpFlag() {
		return opFlag;
	}
	public String getSeq() {
		return seq;
	}
	public Integer getParentMask() {
		return parentMask;
	}
	public Integer getMask() {
		return mask;
	}
	public Integer getChildmask() {
		return childmask;
	}
	public Integer getType() {
		return type;
	}
	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}
	public void setOpCode(String opCode) {
		this.opCode = opCode;
	}
	public void setOpStatus(Integer opStatus) {
		this.opStatus = opStatus;
	}
	public void setOpWeight(Integer opWeight) {
		this.opWeight = opWeight;
	}
	public void setOpName(String opName) {
		this.opName = opName;
	}
	public void setOpFlag(Integer opFlag) {
		this.opFlag = opFlag;
	}
	public void setSeq(String seq) {
		this.seq = seq;
	}
	public void setParentMask(Integer parentMask) {
		this.parentMask = parentMask;
	}
	public void setMask(Integer mask) {
		this.mask = mask;
	}
	public void setChildmask(Integer childmask) {
		this.childmask = childmask;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((opCode == null) ? 0 : opCode.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		OperationTreeBean other = (OperationTreeBean) obj;
		if (opCode == null) {
			if (other.opCode != null)
				return false;
		} else if (!opCode.equals(other.opCode))
			return false;
		return true;
	}

}
